package gob.osinerg.emergencia.dao;

import gob.osinerg.emergencia.bean.Dominio;

import java.util.ArrayList;
import java.util.List;

import org.hibernate.Criteria;
import org.hibernate.criterion.Restrictions;
import org.springframework.orm.hibernate3.support.HibernateDaoSupport;

public class DominioDAOImpl extends HibernateDaoSupport implements DominioDAO{

	public List selectByDominio(String domain) throws Exception {
		
		Criteria criteria = getSession().createCriteria(Dominio.class);
		criteria.add(Restrictions.eq("dominio", domain));
		
		return criteria.list();
	}

}
